﻿<%@ Page Title="" Language="C#" MasterPageFile="~/LivingWellClinic.Master" AutoEventWireup="true" CodeBehind="Donate.aspx.cs" Inherits="livingwellclinic.WebForm1" %>

<asp:Content ID="Content0" ContentPlaceHolderID="title" runat="server">Donate</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style15
        {
            width: 126px;
            height: 20px;
        }
        .style16
        {
            width: 47px;
            height: 20px;
        }
        .hometext
        {
            width: 441px;
            height: 12px;
        }
        .style17
        {
            height: 11px;
        }
        .style18
        {
            width: 47px;
            height: 11px;
        }
        .style22
        {
            width: 101px;
        }
        .style24
        {
            width: 50px;
            height: 20px;
        }
        .style26
        {
            width: 21px;
            height: 20px;
        }
        </style>
        <script type="text/javascript">
            function showMonetary() {
                $('#supplies').hide();
                $('#monetary').show();
                $('.hidden').show();
                //document.getElementById("monetary").style.display = 'block';
            }

            function showSupplies() {
                $('#monetary').hide();
                $('#supplies').show();
                $('.hidden').show();
            }
        </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" runat="server">
    <p>
        Thank you for considering donating to the Living Well Clinic.</p>
    How are you planning to donate?
    
    <asp:RadioButton runat="server" ID="monetaryRadio" onclick="showMonetary();" 
        GroupName="donatetype" oncheckedchanged="showSubmit" />Monetary
    <asp:RadioButton runat="server" ID="suppliesRadio" onclick="showSupplies();" 
        GroupName="donatetype" oncheckedchanged="showSubmit" />Supplies
    
    <br />
    <br />
    <div id="monetary" style= "display: none;">
            <asp:Label ID="Label3" runat="server" 
                Text="Please chose an option for financing the clinic" 
                style="text-align: center"></asp:Label>
            <br />
            <br />
            <asp:RadioButtonList runat="server" ID="paymentType">
                <asp:ListItem id="option1" runat="server" Value="Visa" />
                <asp:ListItem id="option2" runat="server" Value="Mastercard" />
                <asp:ListItem id="option3" runat="server" Value="Discover" />
            </asp:RadioButtonList>
            <br />
            <table class="hometext">
                <tr>
                    <td class="style17">
                        <asp:Label ID="lbl1" runat="server" Text="Amount:"></asp:Label>
                    </td>
                    <td class="style18" colspan="4">
                        <asp:TextBox ID="amounttxt" runat="server" Height="22px" Width="65px"></asp:TextBox>
                    </td>
                    <td class="style18">
                        <asp:RequiredFieldValidator ID="AmountRequiredFieldValidator" runat="server" 
                            ControlToValidate="amounttxt" Display="Dynamic" 
                            ErrorMessage="Please enter an amount for your donation" style="color: #FF0000" 
                            ValidationGroup="Donate">*</asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="AmountCompareValidator" runat="server" 
                            ControlToValidate="amounttxt" Display="Dynamic" 
                            ErrorMessage="Please enter a currency amount" Operator="DataTypeCheck" 
                            style="color: #FF0000" Type="Currency" ValidationGroup="Donate">*</asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style17">
                        <asp:Label ID="Label1" runat="server" Text="Card Number:"></asp:Label>
                    </td>
                    <td class="style18" colspan="4">
                        <asp:TextBox ID="cardnumbertxt" runat="server"></asp:TextBox>
                    </td>
                    <td class="style18">
                        <asp:RequiredFieldValidator ID="CardNumberRequiredFieldValidator" 
                            runat="server" ControlToValidate="cardnumbertxt" Display="Dynamic" 
                            ErrorMessage="Please enter a credit card number" style="color: #FF0000" 
                            ValidationGroup="Donate">*</asp:RequiredFieldValidator>
                        <asp:CustomValidator ID="CardNumberCustomValidator" runat="server" 
                            ControlToValidate="cardnumbertxt" Display="Dynamic" 
                            ErrorMessage="Credit Card number not valid" style="color: #FF0000" 
                            ValidationGroup="Donate" >
                           <!-- onservervalidate="CardNumberCustomValidator_ServerValidate1">*--></asp:CustomValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style15">
                        <asp:Label ID="Label2" runat="server" Text="Security Number:"></asp:Label>
                    </td>
                    <td class="style16" colspan="4">
                        <asp:TextBox ID="securitynumbertxt" runat="server" Width="55px"></asp:TextBox>
                    </td>
                    <td class="style16">
                        <asp:RequiredFieldValidator ID="SecurityNumberRequiredFieldValidator" 
                            runat="server" ControlToValidate="securitynumbertxt" Display="Dynamic" 
                            ErrorMessage="Please enter the security code found on your card" 
                            style="color: #FF0000" ValidationGroup="Donate">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="SecurityNumberRegularExpressionValidator" 
                            runat="server" ControlToValidate="securitynumbertxt" Display="Dynamic" 
                            ErrorMessage="Please enter a three digit security code" style="color: #FF0000" 
                            Validation      Expression="\w{3}" ValidationGroup="Donate">*</asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td class="style15">
                        Expiration Date:</td>
                    <td class="style16">
                        Month:</td>
                    <td class="style16">
                        <asp:DropDownList ID="DropDownList1" runat="server">
                            <asp:ListItem Value="0">Jan</asp:ListItem>
                            <asp:ListItem Value="1">Feb</asp:ListItem>
                            <asp:ListItem Value="2">Mar</asp:ListItem>
                            <asp:ListItem Value="3">Apr</asp:ListItem>
                            <asp:ListItem Value="4">May</asp:ListItem>
                            <asp:ListItem Value="5">June</asp:ListItem>
                            <asp:ListItem Value="6">July</asp:ListItem>
                            <asp:ListItem Value="7">Aug</asp:ListItem>
                            <asp:ListItem Value="8">Sept</asp:ListItem>
                            <asp:ListItem Value="9">Oct</asp:ListItem>
                            <asp:ListItem Value="10">Nov</asp:ListItem>
                            <asp:ListItem Value="11">Dec</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td class="style24">
                        Year:</td>
                    <td class="style26">
                        <asp:TextBox ID="CCYearTextBox" runat="server" Width="75px"></asp:TextBox>
                    </td>
                    <td class="style16">
                        <asp:RequiredFieldValidator ID="ExpirationDateRequiredFieldValidator" 
                            runat="server" Display="Dynamic" 
                            ErrorMessage="Please enter the year your card expires" style="color: #FF0000" 
                            ValidationGroup="Donate" ControlToValidate="CCYearTextBox">*</asp:RequiredFieldValidator>
                        <asp:RangeValidator ID="DateRangeValidator" runat="server" 
                            ControlToValidate="CCYearTextBox" Display="Dynamic" 
                            ErrorMessage="Year not valid" style="color: #FF0000" ValidationGroup="Donate">*</asp:RangeValidator>
                        <asp:CustomValidator ID="ddlvalid" runat="server" 
                            ErrorMessage="Please Select a month" style="color: #FF0000" 
                            ValidationGroup="Donate">*</asp:CustomValidator>
                    </td>
                </tr>
            </table>
        </div>
        <div id="supplies" style="display: none;">
        <br />
            <asp:Label ID="lbl3" runat="server" 
                
                Text="Please enter what you can donate (please note that you will recieve email for more information):"></asp:Label>
            <br />
            <asp:TextBox ID="suppliestxt" runat="server" Height="149px" 
                style="margin-top: 0px" TextMode="MultiLine" Width="541px"></asp:TextBox>
       </div>
    <br />
    <asp:Label runat="server" ID="error" Text="" ForeColor="Red" /><br />
    <asp:Button ID="submitbutton" runat="server" CssClass="hidden" Text="Submit" />
    <asp:Button ID="cancelbutton" runat="server" Text="Cancel" 
        onclick="cancelbutton_Click" />
</asp:Content>

